home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
umerge.z
/
umerge
Wrap
Text File
|
1998-10-30
|
8KB
|
133 lines
UUUUMMMMEEEERRRRGGGGEEEE((((1111----SSSSyyyyssssVVVV)))) UUUUMMMMEEEERRRRGGGGEEEE((((1111----SSSSyyyyssssVVVV))))
NNNNAAAAMMMMEEEE
umerge - Ucode Inliner
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
uuuummmmeeeerrrrggggeeee _i_n_p_u_t__f_i_l_e ----oooo _i_n_l_i_n_e_d__f_i_l_e [ ----tttt _s_y_m__f_i_l_e ----iiii _c_o_n_t_r_o_l__f_i_l_e
----ssssppppaaaacccceeee____ttttiiiimmmmeeee _v_a_l_u_e ----iiiinnnnlllliiiinnnneeee____ttttoooo _v_a_l_u_e ] [ ----vvvv ----nnnnooooiiiinnnnlllliiiinnnneeee ----iiiinnnnlllliiiinnnneeee____aaaallllllll
----nnnnoooo____iiiinnnniiiitttt____ttttoooo____aaaassssssss ----nnnnoooo____pppprrrroooommmmoooottttiiiioooonnnn ]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
uuuummmmeeeerrrrggggeeee,,,, the _u_c_o_d_e inliner, reads the input binary ucode file into an
input ucode buffer. An output ucode buffer is then allocated. uuuummmmeeeerrrrggggeeee
then makes a pass over the input ucode buffer to collect information and
build data structures, including the program call graph. This pass also
copies all top-level non-procedure ucode to the output buffer. It then
analyzes the data structures to decide what to do for the output ucode.
Finally, it copies the code from the input buffer to the output buffer
according to a depth-first, post-order traversal of the program call
graph. In this process, procedure bodies are conditionally integrated at
their points of calls. When inlining procedures, the procedure code is
taken from the output buffer. This allows the output of integrating
procedure A into B to be used when procedure B is later integrated into
procedure C.
Apart from the above basic functions, uuuummmmeeeerrrrggggeeee also does additional
optimizations that naturally belong to it. For FORTRAN programs, it
promotes reference parameters to value parameters whenever this can
safely be performed. When the actual parameter is a constant, it fetches
the constant value from the INIT ucode and passes the constants directly.
When the actual parameter is an initialized variable that is never
written in the whole program, it also looks up the initialized value and
passes the constant value directly.
uuuummmmeeeerrrrggggeeee also recognizes initialized variables that are never written into
and converts the initializations to run-time assignments at the beginning
of the procedures. This allows the later global optimizer to perform
constant propagation, constant folding and dead store elimination to
further improve the code.
The following options are interpreted by uuuummmmeeeerrrrggggeeee.
----vvvv Turns on verbose mode. In this mode, umerge will print the name
of the procedure it is currently copying to the output buffer.
It also prints the name of the procedure it is inlining at each
call site.
----nnnnooooiiiinnnnlllliiiinnnneeee
Suppresses the inlining functionality. All other optimizations
are still performed.
----iiiinnnnlllliiiinnnneeee____aaaallllllll
Inline all calls in the program. This option should only be used
with discretion, since it can create tremendous optimization
PPPPaaaaggggeeee 1111
UUUUMMMMEEEERRRRGGGGEEEE((((1111----SSSSyyyyssssVVVV)))) UUUUMMMMEEEERRRRGGGGEEEE((((1111----SSSSyyyyssssVVVV))))
overhead in the later optimization phases.
----nnnnoooo____iiiinnnniiiitttt____ttttoooo____aaaassssssss
Turns off uuuummmmeeeerrrrggggeeee's initialization to run-time assignment
conversion.
----nnnnoooo____pppprrrroooommmmoooottttiiiioooonnnn
Turns off reference parameter to value parameter promotion.
----tttt _s_y_m__f_i_l_e
Tells uuuummmmeeeerrrrggggeeee the name of the symbol table file. This is
necessary for uuuummmmeeeerrrrggggeeee to know the names of all the procedures.
----iiii _c_o_n_t_r_o_l__f_i_l_e
Gives direct control over uuuummmmeeeerrrrggggeeee on the inlining of specific
procedures. The control file must be made up of lines that start
with a "+" or a "-" in the first column, followed by a procedure
name. The procedures can be listed in arbitrary order in the
file. Procedures marked with "+" are always inlined, and those
marked with "-" are never inlined.
----ssssppppaaaacccceeee____ttttiiiimmmmeeee _v_a_l_u_e
Uses the given value for this parameter. uuuummmmeeeerrrrggggeeee's inlining
decision is based on this parameter that represents space/time
tradeoff. The default value is 3.0. This tells uuuummmmeeeerrrrggggeeee that a
size increase of 3 instructions is worthy of each cycle reduction
in execution time. In other words, uuuummmmeeeerrrrggggeeee will inline a
procedure whenever the inlining causes 3 or less additional
instructions in code size for every 1 cycle speedup in execution
time. The value specified in this option does not need to be a
whole number.
----iiiinnnnlllliiiinnnneeee____ttttoooo _v_a_l_u_e
The default value of this parameter is 0. A positive value of
this parameter asks umerge to perform additional inlining of
calls to leaf routines up to the specified level, in addition to
its automatic decision mechanism. A value of 1 will cause all
calls to leaf procedures to be inlined. A value of 2 will
additionally cause all calls to procedures that became leaves due
to level 1 inlining to be inlined, etc. Under this option, a
procedure will become a leaf in the inlined output code if and
only if the procedure's maximum distance from a leaf in the call
graph is less than or equal to the value of this parameter. This
option is not affected by the -noinline option.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_u_c_o_d_e(1), _b_t_o_u(1),
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
uuuummmmeeeerrrrggggeeee assumes the input ucode file is error-free. Otherwise, there is
no guarantee on its behavior.
PPPPaaaaggggeeee 2222